﻿/// <reference path="../Scripts/msls.js" />

window.myapp = msls.application;

(function (lightSwitchApplication) {

    var $Entity = msls.Entity,
        $DataService = msls.DataService,
        $DataWorkspace = msls.DataWorkspace,
        $defineEntity = msls._defineEntity,
        $defineDataService = msls._defineDataService,
        $defineDataWorkspace = msls._defineDataWorkspace,
        $DataServiceQuery = msls.DataServiceQuery,
        $toODataString = msls._toODataString;

    function Car(entitySet) {
        /// <summary>
        /// Represents the Car entity type.
        /// </summary>
        /// <param name="entitySet" type="msls.EntitySet" optional="true">
        /// The entity set that should contain this car.
        /// </param>
        /// <field name="Id" type="Number">
        /// Gets or sets the id for this car.
        /// </field>
        /// <field name="PlateNo" type="String">
        /// Gets or sets the plateNo for this car.
        /// </field>
        /// <field name="Image" type="String">
        /// Gets or sets the image for this car.
        /// </field>
        /// <field name="Color" type="String">
        /// Gets or sets the color for this car.
        /// </field>
        /// <field name="Model" type="String">
        /// Gets or sets the model for this car.
        /// </field>
        /// <field name="Movements" type="msls.EntityCollection" elementType="msls.application.Movement">
        /// Gets the movements for this car.
        /// </field>
        /// <field name="Favorites" type="msls.EntityCollection" elementType="msls.application.Favorite">
        /// Gets the favorites for this car.
        /// </field>
        /// <field name="UserName" type="String">
        /// Gets or sets the userName for this car.
        /// </field>
        /// <field name="details" type="msls.application.Car.Details">
        /// Gets the details for this car.
        /// </field>
        $Entity.call(this, entitySet);
    }

    function Favorite(entitySet) {
        /// <summary>
        /// Represents the Favorite entity type.
        /// </summary>
        /// <param name="entitySet" type="msls.EntitySet" optional="true">
        /// The entity set that should contain this favorite.
        /// </param>
        /// <field name="Id" type="Number">
        /// Gets or sets the id for this favorite.
        /// </field>
        /// <field name="Car" type="msls.application.Car">
        /// Gets or sets the car for this favorite.
        /// </field>
        /// <field name="Place" type="msls.application.Place">
        /// Gets or sets the place for this favorite.
        /// </field>
        /// <field name="IsSubscribed" type="Boolean">
        /// user whants to get notifications
        /// </field>
        /// <field name="details" type="msls.application.Favorite.Details">
        /// Gets the details for this favorite.
        /// </field>
        $Entity.call(this, entitySet);
    }

    function Movement(entitySet) {
        /// <summary>
        /// Represents the Movement entity type.
        /// </summary>
        /// <param name="entitySet" type="msls.EntitySet" optional="true">
        /// The entity set that should contain this movement.
        /// </param>
        /// <field name="Id" type="Number">
        /// Gets or sets the id for this movement.
        /// </field>
        /// <field name="DateFrom" type="Date">
        /// Gets or sets the dateFrom for this movement.
        /// </field>
        /// <field name="Hours" type="Number">
        /// Gets or sets the hours for this movement.
        /// </field>
        /// <field name="Amount" type="String">
        /// Gets or sets the amount for this movement.
        /// </field>
        /// <field name="DateTo" type="Date">
        /// Gets or sets the dateTo for this movement.
        /// </field>
        /// <field name="Description" type="String">
        /// Gets or sets the description for this movement.
        /// </field>
        /// <field name="Swap_Movement" type="Number">
        /// Gets or sets the swap_Movement for this movement.
        /// </field>
        /// <field name="SwapStatus" type="Number">
        /// Gets or sets the swapStatus for this movement.
        /// </field>
        /// <field name="Car" type="msls.application.Car">
        /// Gets or sets the car for this movement.
        /// </field>
        /// <field name="Place" type="msls.application.Place">
        /// Gets or sets the place for this movement.
        /// </field>
        /// <field name="SwapCar_Movement" type="Number">
        /// Gets or sets the swapCar_Movement for this movement.
        /// </field>
        /// <field name="SwapMovement" type="msls.application.SwapMovement">
        /// Gets or sets the swapMovement for this movement.
        /// </field>
        /// <field name="Minutes" type="Number">
        /// Gets or sets the minutes for this movement.
        /// </field>
        /// <field name="Rating" type="Number">
        /// Gets or sets the rating for this movement.
        /// </field>
        /// <field name="details" type="msls.application.Movement.Details">
        /// Gets the details for this movement.
        /// </field>
        $Entity.call(this, entitySet);
    }

    function Place(entitySet) {
        /// <summary>
        /// Represents the Place entity type.
        /// </summary>
        /// <param name="entitySet" type="msls.EntitySet" optional="true">
        /// The entity set that should contain this place.
        /// </param>
        /// <field name="Id" type="Number">
        /// Gets or sets the id for this place.
        /// </field>
        /// <field name="Name" type="String">
        /// Gets or sets the name for this place.
        /// </field>
        /// <field name="Address" type="String">
        /// Gets or sets the address for this place.
        /// </field>
        /// <field name="Latitude" type="String">
        /// Gets or sets the latitude for this place.
        /// </field>
        /// <field name="Longitude" type="String">
        /// Gets or sets the longitude for this place.
        /// </field>
        /// <field name="Image" type="String">
        /// Gets or sets the image for this place.
        /// </field>
        /// <field name="IsShared" type="Boolean">
        /// Is place shared with other users
        /// </field>
        /// <field name="Favorites" type="msls.EntityCollection" elementType="msls.application.Favorite">
        /// Gets the favorites for this place.
        /// </field>
        /// <field name="Movements" type="msls.EntityCollection" elementType="msls.application.Movement">
        /// Gets the movements for this place.
        /// </field>
        /// <field name="UserName" type="String">
        /// Gets or sets the userName for this place.
        /// </field>
        /// <field name="Description" type="String">
        /// Gets or sets the description for this place.
        /// </field>
        /// <field name="SwapMovements" type="msls.EntityCollection" elementType="msls.application.SwapMovement">
        /// Gets the swapMovements for this place.
        /// </field>
        /// <field name="Capacity" type="Number">
        /// Gets or sets the capacity for this place.
        /// </field>
        /// <field name="PlacesRestrictions" type="msls.EntityCollection" elementType="msls.application.PlacesRestriction">
        /// Gets the placesRestrictions for this place.
        /// </field>
        /// <field name="details" type="msls.application.Place.Details">
        /// Gets the details for this place.
        /// </field>
        $Entity.call(this, entitySet);
    }

    function PlacesRestriction(entitySet) {
        /// <summary>
        /// Represents the PlacesRestriction entity type.
        /// </summary>
        /// <param name="entitySet" type="msls.EntitySet" optional="true">
        /// The entity set that should contain this placesRestriction.
        /// </param>
        /// <field name="Id" type="Number">
        /// Gets or sets the id for this placesRestriction.
        /// </field>
        /// <field name="Place" type="msls.application.Place">
        /// Gets or sets the place for this placesRestriction.
        /// </field>
        /// <field name="Restriction" type="msls.application.Restriction">
        /// Gets or sets the restriction for this placesRestriction.
        /// </field>
        /// <field name="details" type="msls.application.PlacesRestriction.Details">
        /// Gets the details for this placesRestriction.
        /// </field>
        $Entity.call(this, entitySet);
    }

    function RestrictionRegulation(entitySet) {
        /// <summary>
        /// Represents the RestrictionRegulation entity type.
        /// </summary>
        /// <param name="entitySet" type="msls.EntitySet" optional="true">
        /// The entity set that should contain this restrictionRegulation.
        /// </param>
        /// <field name="Id" type="Number">
        /// Gets or sets the id for this restrictionRegulation.
        /// </field>
        /// <field name="Price" type="String">
        /// Gets or sets the price for this restrictionRegulation.
        /// </field>
        /// <field name="Monday" type="Boolean">
        /// Gets or sets the monday for this restrictionRegulation.
        /// </field>
        /// <field name="Tuesday" type="Boolean">
        /// Gets or sets the tuesday for this restrictionRegulation.
        /// </field>
        /// <field name="Wednesday" type="Boolean">
        /// Gets or sets the wednesday for this restrictionRegulation.
        /// </field>
        /// <field name="Thursday" type="Boolean">
        /// Gets or sets the thursday for this restrictionRegulation.
        /// </field>
        /// <field name="Friday" type="Boolean">
        /// Gets or sets the friday for this restrictionRegulation.
        /// </field>
        /// <field name="Saturday" type="Boolean">
        /// Gets or sets the saturday for this restrictionRegulation.
        /// </field>
        /// <field name="Sunday" type="Boolean">
        /// Gets or sets the sunday for this restrictionRegulation.
        /// </field>
        /// <field name="DateFrom" type="Date">
        /// Gets or sets the dateFrom for this restrictionRegulation.
        /// </field>
        /// <field name="DateTo" type="Date">
        /// Gets or sets the dateTo for this restrictionRegulation.
        /// </field>
        /// <field name="WeekBitMask" type="Number">
        /// Gets or sets the weekBitMask for this restrictionRegulation.
        /// </field>
        /// <field name="Restriction" type="msls.application.Restriction">
        /// Gets or sets the restriction for this restrictionRegulation.
        /// </field>
        /// <field name="Hours" type="Number">
        /// Gets or sets the hours for this restrictionRegulation.
        /// </field>
        /// <field name="Minutes" type="Number">
        /// Gets or sets the minutes for this restrictionRegulation.
        /// </field>
        /// <field name="details" type="msls.application.RestrictionRegulation.Details">
        /// Gets the details for this restrictionRegulation.
        /// </field>
        $Entity.call(this, entitySet);
    }

    function Restriction(entitySet) {
        /// <summary>
        /// Represents the Restriction entity type.
        /// </summary>
        /// <param name="entitySet" type="msls.EntitySet" optional="true">
        /// The entity set that should contain this restriction.
        /// </param>
        /// <field name="Id" type="Number">
        /// Gets or sets the id for this restriction.
        /// </field>
        /// <field name="Description" type="String">
        /// Gets or sets the description for this restriction.
        /// </field>
        /// <field name="Image" type="String">
        /// Gets or sets the image for this restriction.
        /// </field>
        /// <field name="PlacesRestrictions" type="msls.EntityCollection" elementType="msls.application.PlacesRestriction">
        /// Gets the placesRestrictions for this restriction.
        /// </field>
        /// <field name="RestrictionRegulations" type="msls.EntityCollection" elementType="msls.application.RestrictionRegulation">
        /// Gets the restrictionRegulations for this restriction.
        /// </field>
        /// <field name="details" type="msls.application.Restriction.Details">
        /// Gets the details for this restriction.
        /// </field>
        $Entity.call(this, entitySet);
    }

    function SwapMovement(entitySet) {
        /// <summary>
        /// Represents the SwapMovement entity type.
        /// </summary>
        /// <param name="entitySet" type="msls.EntitySet" optional="true">
        /// The entity set that should contain this swapMovement.
        /// </param>
        /// <field name="Id" type="Number">
        /// Gets or sets the id for this swapMovement.
        /// </field>
        /// <field name="Hours" type="Number">
        /// Gets or sets the hours for this swapMovement.
        /// </field>
        /// <field name="Amount" type="String">
        /// Gets or sets the amount for this swapMovement.
        /// </field>
        /// <field name="DateTo" type="Date">
        /// Gets or sets the dateTo for this swapMovement.
        /// </field>
        /// <field name="Description" type="String">
        /// Gets or sets the description for this swapMovement.
        /// </field>
        /// <field name="Swap_Movement" type="Number">
        /// Gets or sets the swap_Movement for this swapMovement.
        /// </field>
        /// <field name="SwapCar_Movement" type="Number">
        /// Gets or sets the swapCar_Movement for this swapMovement.
        /// </field>
        /// <field name="SwapStatus" type="Number">
        /// Gets or sets the swapStatus for this swapMovement.
        /// </field>
        /// <field name="Car_Movement" type="Number">
        /// Gets or sets the car_Movement for this swapMovement.
        /// </field>
        /// <field name="Place_Movement" type="Number">
        /// Gets or sets the place_Movement for this swapMovement.
        /// </field>
        /// <field name="DateFrom" type="Date">
        /// Gets or sets the dateFrom for this swapMovement.
        /// </field>
        /// <field name="Movements" type="msls.EntityCollection" elementType="msls.application.Movement">
        /// Gets the movements for this swapMovement.
        /// </field>
        /// <field name="Place" type="msls.application.Place">
        /// Gets or sets the place for this swapMovement.
        /// </field>
        /// <field name="Minutes" type="Number">
        /// Gets or sets the minutes for this swapMovement.
        /// </field>
        /// <field name="details" type="msls.application.SwapMovement.Details">
        /// Gets the details for this swapMovement.
        /// </field>
        $Entity.call(this, entitySet);
    }

    function MMC_Content(dataWorkspace) {
        /// <summary>
        /// Represents the MMC_Content data service.
        /// </summary>
        /// <param name="dataWorkspace" type="msls.DataWorkspace">
        /// The data workspace that created this data service.
        /// </param>
        /// <field name="Cars" type="msls.EntitySet">
        /// Gets the Cars entity set.
        /// </field>
        /// <field name="Favorites" type="msls.EntitySet">
        /// Gets the Favorites entity set.
        /// </field>
        /// <field name="Movements" type="msls.EntitySet">
        /// Gets the Movements entity set.
        /// </field>
        /// <field name="Places" type="msls.EntitySet">
        /// Gets the Places entity set.
        /// </field>
        /// <field name="PlacesRestrictions" type="msls.EntitySet">
        /// Gets the PlacesRestrictions entity set.
        /// </field>
        /// <field name="RestrictionRegulations" type="msls.EntitySet">
        /// Gets the RestrictionRegulations entity set.
        /// </field>
        /// <field name="Restrictions" type="msls.EntitySet">
        /// Gets the Restrictions entity set.
        /// </field>
        /// <field name="SwapMovements" type="msls.EntitySet">
        /// Gets the SwapMovements entity set.
        /// </field>
        /// <field name="details" type="msls.application.MMC_Content.Details">
        /// Gets the details for this data service.
        /// </field>
        $DataService.call(this, dataWorkspace);
    };
    function DataWorkspace() {
        /// <summary>
        /// Represents the data workspace.
        /// </summary>
        /// <field name="MMC_Content" type="msls.application.MMC_Content">
        /// Gets the MMC_Content data service.
        /// </field>
        /// <field name="details" type="msls.application.DataWorkspace.Details">
        /// Gets the details for this data workspace.
        /// </field>
        $DataWorkspace.call(this);
    };

    msls._addToNamespace("msls.application", {

        Car: $defineEntity(Car, [
            { name: "Id", type: Number, isReadOnly: true },
            { name: "PlateNo", type: String },
            { name: "Image", type: String },
            { name: "Color", type: String },
            { name: "Model", type: String },
            { name: "Movements", kind: "collection", elementType: Movement },
            { name: "Favorites", kind: "collection", elementType: Favorite },
            { name: "UserName", type: String }
        ]),

        Favorite: $defineEntity(Favorite, [
            { name: "Id", type: Number, isReadOnly: true },
            { name: "Car", kind: "reference", type: Car },
            { name: "Place", kind: "reference", type: Place },
            { name: "IsSubscribed", type: Boolean }
        ]),

        Movement: $defineEntity(Movement, [
            { name: "Id", type: Number, isReadOnly: true },
            { name: "DateFrom", type: Date },
            { name: "Hours", type: Number },
            { name: "Amount", type: String },
            { name: "DateTo", type: Date },
            { name: "Description", type: String },
            { name: "Swap_Movement", type: Number },
            { name: "SwapStatus", type: Number },
            { name: "Car", kind: "reference", type: Car },
            { name: "Place", kind: "reference", type: Place },
            { name: "SwapCar_Movement", type: Number },
            { name: "SwapMovement", kind: "reference", type: SwapMovement },
            { name: "Minutes", type: Number },
            { name: "Rating", type: Number }
        ]),

        Place: $defineEntity(Place, [
            { name: "Id", type: Number, isReadOnly: true },
            { name: "Name", type: String },
            { name: "Address", type: String },
            { name: "Latitude", type: String },
            { name: "Longitude", type: String },
            { name: "Image", type: String },
            { name: "IsShared", type: Boolean },
            { name: "Favorites", kind: "collection", elementType: Favorite },
            { name: "Movements", kind: "collection", elementType: Movement },
            { name: "UserName", type: String },
            { name: "Description", type: String },
            { name: "SwapMovements", kind: "collection", elementType: SwapMovement },
            { name: "Capacity", type: Number },
            { name: "PlacesRestrictions", kind: "collection", elementType: PlacesRestriction }
        ]),

        PlacesRestriction: $defineEntity(PlacesRestriction, [
            { name: "Id", type: Number, isReadOnly: true },
            { name: "Place", kind: "reference", type: Place },
            { name: "Restriction", kind: "reference", type: Restriction }
        ]),

        RestrictionRegulation: $defineEntity(RestrictionRegulation, [
            { name: "Id", type: Number, isReadOnly: true },
            { name: "Price", type: String },
            { name: "Monday", type: Boolean },
            { name: "Tuesday", type: Boolean },
            { name: "Wednesday", type: Boolean },
            { name: "Thursday", type: Boolean },
            { name: "Friday", type: Boolean },
            { name: "Saturday", type: Boolean },
            { name: "Sunday", type: Boolean },
            { name: "DateFrom", type: Date },
            { name: "DateTo", type: Date },
            { name: "WeekBitMask", type: Number, isReadOnly: true },
            { name: "Restriction", kind: "reference", type: Restriction },
            { name: "Hours", type: Number },
            { name: "Minutes", type: Number }
        ]),

        Restriction: $defineEntity(Restriction, [
            { name: "Id", type: Number, isReadOnly: true },
            { name: "Description", type: String },
            { name: "Image", type: String },
            { name: "PlacesRestrictions", kind: "collection", elementType: PlacesRestriction },
            { name: "RestrictionRegulations", kind: "collection", elementType: RestrictionRegulation }
        ]),

        SwapMovement: $defineEntity(SwapMovement, [
            { name: "Id", type: Number, isReadOnly: true },
            { name: "Hours", type: Number },
            { name: "Amount", type: String },
            { name: "DateTo", type: Date },
            { name: "Description", type: String },
            { name: "Swap_Movement", type: Number },
            { name: "SwapCar_Movement", type: Number },
            { name: "SwapStatus", type: Number },
            { name: "Car_Movement", type: Number },
            { name: "Place_Movement", type: Number },
            { name: "DateFrom", type: Date },
            { name: "Movements", kind: "collection", elementType: Movement },
            { name: "Place", kind: "reference", type: Place },
            { name: "Minutes", type: Number }
        ]),

        MMC_Content: $defineDataService(MMC_Content, lightSwitchApplication.rootUri + "/MMC_Content.svc", [
            { name: "Cars", elementType: Car },
            { name: "Favorites", elementType: Favorite },
            { name: "Movements", elementType: Movement },
            { name: "Places", elementType: Place },
            { name: "PlacesRestrictions", elementType: PlacesRestriction },
            { name: "RestrictionRegulations", elementType: RestrictionRegulation },
            { name: "Restrictions", elementType: Restriction },
            { name: "SwapMovements", elementType: SwapMovement }
        ], [
            {
                name: "Cars_SingleOrDefault", value: function (Id) {
                    return new $DataServiceQuery({ _entitySet: this.Cars },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/Cars(" + "Id=" + $toODataString(Id, "Int32?") + ")"
                    );
                }
            },
            {
                name: "CarsFiltered", value: function (PlateNo) {
                    return new $DataServiceQuery({ _entitySet: this.Cars },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/CarsFiltered()",
                        {
                            PlateNo: $toODataString(PlateNo, "String?")
                        });
                }
            },
            {
                name: "Favorites_SingleOrDefault", value: function (Id) {
                    return new $DataServiceQuery({ _entitySet: this.Favorites },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/Favorites(" + "Id=" + $toODataString(Id, "Int32?") + ")"
                    );
                }
            },
            {
                name: "FavoritesFiltered", value: function (CarId, PlaceId, Locarion) {
                    return new $DataServiceQuery({ _entitySet: this.Favorites },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/FavoritesFiltered()",
                        {
                            CarId: $toODataString(CarId, "Int32?"),
                            PlaceId: $toODataString(PlaceId, "Int32?"),
                            Locarion: $toODataString(Locarion, "String?")
                        });
                }
            },
            {
                name: "Movements_SingleOrDefault", value: function (Id) {
                    return new $DataServiceQuery({ _entitySet: this.Movements },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/Movements(" + "Id=" + $toODataString(Id, "Int32?") + ")"
                    );
                }
            },
            {
                name: "MovementsFiltered", value: function (PlaceId, CarId, MovementDate) {
                    return new $DataServiceQuery({ _entitySet: this.Movements },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/MovementsFiltered()",
                        {
                            PlaceId: $toODataString(PlaceId, "Int32?"),
                            CarId: $toODataString(CarId, "Int32?"),
                            MovementDate: $toODataString(MovementDate, "DateTime?")
                        });
                }
            },
            {
                name: "Places_SingleOrDefault", value: function (Id) {
                    return new $DataServiceQuery({ _entitySet: this.Places },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/Places(" + "Id=" + $toODataString(Id, "Int32?") + ")"
                    );
                }
            },
            {
                name: "PlacesFiltered", value: function (Location, IsShared, UserName, Id) {
                    return new $DataServiceQuery({ _entitySet: this.Places },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/PlacesFiltered()",
                        {
                            Location: $toODataString(Location, "String?"),
                            IsShared: $toODataString(IsShared, "Boolean?"),
                            UserName: $toODataString(UserName, "String?"),
                            Id: $toODataString(Id, "Int32?")
                        });
                }
            },
            {
                name: "PlacesFound", value: function (Id) {
                    return new $DataServiceQuery({ _entitySet: this.Places },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/PlacesFound()",
                        {
                            Id: $toODataString(Id, "Int32?")
                        });
                }
            },
            {
                name: "PlacesRestrictions_SingleOrDefault", value: function (Id) {
                    return new $DataServiceQuery({ _entitySet: this.PlacesRestrictions },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/PlacesRestrictions(" + "Id=" + $toODataString(Id, "Int32?") + ")"
                    );
                }
            },
            {
                name: "PlacesRestrictionsFiltered", value: function () {
                    return new $DataServiceQuery({ _entitySet: this.PlacesRestrictions },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/PlacesRestrictionsFiltered()",
                        {
                        });
                }
            },
            {
                name: "RestrictionRegulations_SingleOrDefault", value: function (Id) {
                    return new $DataServiceQuery({ _entitySet: this.RestrictionRegulations },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/RestrictionRegulations(" + "Id=" + $toODataString(Id, "Int32?") + ")"
                    );
                }
            },
            {
                name: "RestrictionRegulationsFiltered", value: function (MaxHours, MaxPrice, RestrictionDate) {
                    return new $DataServiceQuery({ _entitySet: this.RestrictionRegulations },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/RestrictionRegulationsFiltered()",
                        {
                            MaxHours: $toODataString(MaxHours, "Int16?"),
                            MaxPrice: $toODataString(MaxPrice, "Decimal?"),
                            RestrictionDate: $toODataString(RestrictionDate, "DateTime?")
                        });
                }
            },
            {
                name: "Restrictions_SingleOrDefault", value: function (Id) {
                    return new $DataServiceQuery({ _entitySet: this.Restrictions },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/Restrictions(" + "Id=" + $toODataString(Id, "Int32?") + ")"
                    );
                }
            },
            {
                name: "RestrictionsFiltered", value: function (Description) {
                    return new $DataServiceQuery({ _entitySet: this.Restrictions },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/RestrictionsFiltered()",
                        {
                            Description: $toODataString(Description, "String?")
                        });
                }
            },
            {
                name: "SwapMovements_SingleOrDefault", value: function (Id) {
                    return new $DataServiceQuery({ _entitySet: this.SwapMovements },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/SwapMovements(" + "Id=" + $toODataString(Id, "Int32?") + ")"
                    );
                }
            },
            {
                name: "SwapMovementsFiltered", value: function (Id, ExcludeMovementId, ExcludeCarId) {
                    return new $DataServiceQuery({ _entitySet: this.SwapMovements },
                        lightSwitchApplication.rootUri + "/MMC_Content.svc" + "/SwapMovementsFiltered()",
                        {
                            Id: $toODataString(Id, "Int32?"),
                            ExcludeMovementId: $toODataString(ExcludeMovementId, "Int32?"),
                            ExcludeCarId: $toODataString(ExcludeCarId, "Int32?")
                        });
                }
            }
        ]),

        DataWorkspace: $defineDataWorkspace(DataWorkspace, [
            { name: "MMC_Content", type: MMC_Content }
        ])

    });

}(msls.application));
